package com.wtwd.device.dao;


import com.wtwd.device.model.entity.AppUserMedal;
import com.wtwd.device.model.entity.Medal;
import com.wtwd.device.model.entity.MedalVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mjy
 * @date 2021/09/23
 * @description
 */
@Mapper
public interface MedalMapper {


    List<Medal> getUserNotBoundMedal(@Param("userId") Long userId, @Param("medalType") int medalType);

    Integer bathAddUserMedal(@Param("list") List<AppUserMedal> bathAddMedalList);

    List<MedalVo> getUserAllMedal(@Param("userId") Long userId);

    @Delete("delete from app_user_medal where user_id =#{userId}")
    int deleteUserMedal(@Param("userId") Long userId);
}
